﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Data;

namespace SearchCrawlLogViewer
{
    class CrawlLogData
    {
        int _startIndex;
        int _itemCount;
        bool _isLastPage;
        DataTable _crawlLogDataTable;

        public int StartIndex
        {
            get { return _startIndex; }
        }

        public int EndIndex
        {
            get { return _startIndex + _itemCount - 1; }
        }

        public int ItemCount
        {
            get { return _itemCount; }
        }

        public bool IsLastPage
        {
            get { return _isLastPage; }
        }

        public bool IsFirstPage
        {
            get { return _startIndex == 1; }
        }

        public DataTable CrawlLogDataTable
        {
            get { return _crawlLogDataTable; }
        }

        public CrawlLogData(DataTable crawlLogDataTable, int startIndex,
            bool isLastPage)
        {
            _startIndex = startIndex;
            _itemCount = crawlLogDataTable.Rows.Count;
            _isLastPage = isLastPage;

            _crawlLogDataTable = crawlLogDataTable;
        }
    }
}
